<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Notice extends Model
{
    protected $table = 'v_notice';

    /**
     * 不可批量赋值的属性
     * @var array
     */
    protected $guarded = ['id'];

    // 通知和消息关联
    public function noticeMessage()
    {
        return $this->hasMany('App\Models\NoticeMessage', 'notice_id', 'id');
    }
}
